﻿using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.IO;

namespace OpenLS.Spreadsheet.Formats.Biff.Records
{
    internal class FtCf
    {
        private ushort _cf;

        public void Read(BinaryReader reader)
        {
            ushort ft = reader.ReadUInt16();
            Contract.Assert(ft == 0x0007);
            ushort cb = reader.ReadUInt16();
            Contract.Assert(cb == 0x0002);
            _cf = reader.ReadUInt16();
//0x0002
// Specifies the format of the picture is an enhanced metafile.

//0x0009
            //Specifies the format of the picture is a bitmap.

//0xFFFF
// Specifies the picture is in an unspecified format that is neither and enhanced metafile nor a bitmap. 
        }

        public void Write(BinaryWriter writer)
        {
            ushort ft = 0x0007;
            writer.Write(ft);
            ushort cb = 0x0002;
            writer.Write(cb);
            writer.Write(_cf);
        }
    }
}